package com.cnboy.security.controller;


import org.springframework.scheduling.annotation.Async;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class HelloController {

    @RequestMapping("/hello")
    @PreAuthorize("hasAuthority('system:first:list')")
    public String hello(){
        return "hello";
    }

}
